package com.skzh.equipment.service.impl;

import java.util.List;
import com.skzh.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.skzh.equipment.mapper.LightControlMapper;
import com.skzh.equipment.domain.LightControl;
import com.skzh.equipment.service.ILightControlService;

/**
 * 灯光控制配置Service业务层处理
 *
 * @author skzh
 * @date 2025-03-22
 */
@Service
public class LightControlServiceImpl implements ILightControlService {
    @Autowired
    private LightControlMapper lightControlMapper;

    /**
     * 查询灯光控制配置
     *
     * @param lcId 灯光控制配置主键
     * @return 灯光控制配置
     */
    @Override
    public LightControl selectLightControlByLcId(Long lcId) {
        return lightControlMapper.selectLightControlByLcId(lcId);
    }

    /**
     * 查询灯光控制配置列表
     *
     * @param lightControl 灯光控制配置
     * @return 灯光控制配置
     */
    @Override
    public List<LightControl> selectLightControlList(LightControl lightControl) {
        return lightControlMapper.selectLightControlList(lightControl);
    }

    /**
     * 新增灯光控制配置
     *
     * @param lightControl 灯光控制配置
     * @return 结果
     */
    @Override
    public int insertLightControl(LightControl lightControl) {
        lightControl.setCreateTime(DateUtils.getNowDate());
        return lightControlMapper.insertLightControl(lightControl);
    }

    /**
     * 修改灯光控制配置
     *
     * @param lightControl 灯光控制配置
     * @return 结果
     */
    @Override
    public int updateLightControl(LightControl lightControl) {
        lightControl.setUpdateTime(DateUtils.getNowDate());
        return lightControlMapper.updateLightControl(lightControl);
    }

    /**
     * 批量删除灯光控制配置
     *
     * @param lcIds 需要删除的灯光控制配置主键
     * @return 结果
     */
    @Override
    public int deleteLightControlByLcIds(Long[] lcIds) {
        return lightControlMapper.deleteLightControlByLcIds(lcIds);
    }

    /**
     * 删除灯光控制配置信息
     *
     * @param lcId 灯光控制配置主键
     * @return 结果
     */
    @Override
    public int deleteLightControlByLcId(Long lcId) {
        return lightControlMapper.deleteLightControlByLcId(lcId);
    }
}
